<?php include(TPL_PATH . '/admin/inc_header.php'); ?>

<style>
#id_captcha {cursor:pointer; margin-top:-10px;}
</style>

<script type="text/javascript">
$(document).ready(function() {
	var change_code = function() {
		$('#id_captcha').attr('src', '<?php p(HTTP_URL) ?>/index.php?c=captcha&z=' + (new Date).getTime());
	}
	$('#id_captcha').tooltip({'placement':'right'}).click(change_code);
	setInterval(change_code, 300000);
});
</script>

<div class="container-fluid" style="margin-top:50px;">
	<div class="row-fluid">
		<div class="span2 offset5">
			<form method="post" action="">
				<fieldset>
					<legend>管理员登录</legend>
					
					<?php if (!empty($strMsg)) { ?>
        			<div class="alert alert-error">
        				<button type="button" class="close" data-dismiss="alert">&times;</button>
        				<?php p($strMsg) ?>
        			</div>
        			<?php } ?>
					
					<label for="id_username">帐号</label>
					<input type="text" name="username" id="id_username" value="<?php p($strName) ?>" />
					<label for="id_password">密码</label>
					<input type="password" name="password" id="id_password" />
					<label for="id_code">验证码</label>
					<input class="input-mini" type="text" name="code" id="id_code" />
					<img id="id_captcha" src="<?php p(HTTP_URL) ?>/index.php?c=captcha&z=<?php p(time()) ?>" alt="" title="Click to refresh" />
					<br /><br />
					<input type="submit" name="sub_btn" class="btn btn-large btn-primary" value="登录" />
					&nbsp;
					<a href="javascript:alert('你活该!');">忘记密码 ?</a>
				</fieldset>
			</form>
		</div>
	</div>
</div>

<?php include(TPL_PATH . '/admin/inc_footer.php'); ?>